useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() +  'protoStoreSales3.bin')
		click('Edit1')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,0')
		select_menu('Fully Expand Tree')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,9')
		select_menu('Edit Record')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,3')
		select_menu('Hide Column')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1]]')
##		select('Table', '')
		rightclick('Table', 'Data,2')
		select_menu('Hide Column')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118]]')
##		select('Table', '')
		rightclick('Table', 'Data,1')
		select_menu('Hide Column')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558]]')
##		select('Table', '')
		rightclick('Table', 'Data,0')
		select_menu('Show Product Fields>>saleDate')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118]]')
##		select('Table', '')
		rightclick('Table', 'Data,1')
		select_menu('Show Product Fields>>quantity')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1]]')
##		select('Table', '')
		rightclick('Table', 'Data,2')
		select_menu('Show Product Fields>>price')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,0')
		select_menu('Hide Column')
		assert_p('Table', 'Content', '[[saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,0')
		select_menu('Hide Column')
		assert_p('Table', 'Content', '[[quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,0')
		select_menu('Hide Column')
		assert_p('Table', 'Content', '[[price, 4, , -19000, -19000]]')
##		select('Table', '')
		
		rightclick('Table', 'Data,0')
		
		select_menu('Show Product Fields>>keycode')

		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,1')
		select_menu('Show Product Fields>>saleDate')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [price, 4, , -19000, -19000]]')
##		select('Table', '')
		rightclick('Table', 'Data,1')
		select_menu('Show Product Fields>>quantity')
		assert_p('Table', 'Content', '[[keycode, 1, , 69684558, 69684558], [saleDate, 2, , 40118, 40118], [quantity, 3, , -1, -1], [price, 4, , -19000, -19000]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
	close()
